package com.platform.qujia.service;


import com.platform.qujia.param.request.RechargeBalance;
import com.platform.qujia.pojo.AppUserInfo;
import com.platform.qujia.pojo.Enterprise;
import com.platform.qujia.pojo.ReductionActivityBalanceRecord;
import com.platform.qujia.pojo.Station;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import java.math.BigDecimal;
import java.util.List;

/**
 * (ReductionActivityBalanceRecord)表服务接口
 *
 * @author makejava
 * @since 2023-08-29 17:23:57
 */
public interface ReductionActivityBalanceRecordService {

    /**
     * 通过ID查询单条数据
     *
     * @param rabrId 主键
     * @return 实例对象
     */
    ReductionActivityBalanceRecord queryById(Long rabrId);

    /**
     * 分页查询
     *
     * @param reductionActivityBalanceRecord 筛选条件
     * @param pageRequest      分页对象
     * @return 查询结果
     */
    Page<ReductionActivityBalanceRecord> queryByPage(ReductionActivityBalanceRecord reductionActivityBalanceRecord, PageRequest pageRequest);

    /**
     * 新增数据
     *
     * @param reductionActivityBalanceRecord 实例对象
     * @return 实例对象
     */
    ReductionActivityBalanceRecord insert(ReductionActivityBalanceRecord reductionActivityBalanceRecord);

    /**
     * 修改数据
     *
     * @param reductionActivityBalanceRecord 实例对象
     * @return 实例对象
     */
    ReductionActivityBalanceRecord update(ReductionActivityBalanceRecord reductionActivityBalanceRecord);

    /**
     * 通过主键删除数据
     *
     * @param rabrId 主键
     * @return 是否成功
     */
    boolean deleteById(Long rabrId);

    Integer createBalanceRecord(String order,String CardOilsType, BigDecimal amt, Station station, Long userId, String mobilePhone, Enterprise enterprise,String paymentMethod);
    Integer createBalanceRecord(BigDecimal amt,String physicalCardNo,Long enterpriseId,String paymentMethod,Long stationId);

    List<ReductionActivityBalanceRecord> query(ReductionActivityBalanceRecord recordQuery);

    Integer updateBalance(String cardOilsType, Long userId,Long stationId, Long enterpriseId, BigDecimal rechargeDiscountAmt, BigDecimal orderAmt,String mobilePhone);

    /**
     *
     * @param CardOilsType
     * @param userId
     * @param stationId
     * @param enterpriseId
     * @param amt 订单实付金额
     * @param mobilePhone
     * @return
     */
    Integer updateBalance(String CardOilsType,Long userId,Long stationId,Long enterpriseId,BigDecimal amt,String mobilePhone);


    Integer updateBalance( BigDecimal amt,BigDecimal rCHReductionAmt,String physicalCardNo);
}
